home *** CD-ROM | disk | FTP | other *** search
/ Cocktail Hour / image.iso / COCKTAIL.DIR / drinks_8_drinks main.ls < prev    next >
Encoding:
Text File  |  1997-03-05  |  1.9 KB  |  69 lines

  1. on exitFrame
  2.   global SoundActive, gProgrmPathOnHD, OnceCheck
  3.   if SoundActive and (soundBusy(1) = 0) then
  4.     sound playFile 1, gProgrmPathOnHD & "drinks"
  5.   end if
  6.   if OnceCheck = 0 then
  7.     set OnceCheck to 1
  8.     cursor(-1)
  9.     repeat with i = 3 to 23
  10.       set the cursor of sprite i to [34, 35]
  11.       puppetSprite(i, 1)
  12.     end repeat
  13.     repeat with i = 42 to 48
  14.       puppetSprite(i, 1)
  15.     end repeat
  16.   end if
  17.   repeat with i = 3 to 7
  18.     if the member of sprite i = "origin" = 0 then
  19.       if rollOver(i) = 0 then
  20.         set the member of sprite i to member "origin"
  21.       end if
  22.     end if
  23.   end repeat
  24.   go(the frame)
  25. end
  26.  
  27. on mouseDown
  28.   global checkPress
  29.   set checkPress to the clickOn
  30.   set bDown to the clickOn
  31.   if (bDown > 2) and (bDown < 24) then
  32.     set destName to the name of the member of sprite bDown
  33.     set checkVec to ["abc", "home bar", "non-alco", "hangover", "spirits"]
  34.     set dest to getPos(checkVec, destName) + 2
  35.     set the member of sprite dest to member dest of castLib "drinks"
  36.   else
  37.     if bDown > 41 then
  38.       buttonPressedDown(bDown, "drinks")
  39.     end if
  40.   end if
  41. end
  42.  
  43. on mouseUp
  44.   global checkPress, currMarker, ScrollVec
  45.   set checkPress2 to the clickOn
  46.   if checkPress = checkPress2 then
  47.     set bUp to the clickOn
  48.     if (bUp > 2) and (bUp < 24) then
  49.       set destName to the name of the member of sprite bUp
  50.       clearPuppets()
  51.       set x to the number of lines in field "backField"
  52.       put marker(0) into line x + 1 of field "backField"
  53.       if destName = "abc" then
  54.         set currMarker to destName
  55.         set destName to destName & "A"
  56.       end if
  57.       if destName = "home bar" then
  58.         set the text of field "total" to the text of field "abc"
  59.         set ScrollVec to [1, 1, 1, 1, 1, 1]
  60.       end if
  61.       go(marker(destName))
  62.     else
  63.       if bUp > 41 then
  64.         buttonPressedUp(bUp, "drinks")
  65.       end if
  66.     end if
  67.   end if
  68. end
  69.